function test ()

  disp ('Testeo de la vecindad usando nuestra función contra la del OMESOM');
  disp ('Diferencias: ');
%    test_neighborhood (1, 2, [5 5])
%    test_neighborhood (37, 3, [12 12])
%    test_neighborhood (100, 5, [10 10])
%    test_neighborhood (100, 11, [10 10])
%    test_neighborhood (25, 0, [5 5])
%    test_neighborhood (25, 2, [5 5])
%    test_neighborhood (20, 2, [5 5])
%    test_neighborhood (5, 2, [5 5])
  test_neighborhood (100, 50, [160 160])
																																																																																					 

function test_neighborhood (neu, rad, top)

	 resulset = neighborhood (neu, rad, top);
	 resulset = sort (resulset)

	 % Armamos la topología para pasarle a la función som_unit_neighs
	 topol.type = 'som_topol';
    topol.msize = top;
    topol.lattice = 'rect';
    topol.shape = 'sheet';
  
	 neighs = som_unit_neighs(topol);
	 
	 % Esta es la función que calcula bien las vecindades:
	 nei=[neu];
	 for ne=1:rad
		for n=1:length(nei),
		  nei=[nei find(neighs(nei(n),:))];
		end;
		nei=unique(nei);
	 end;	  
	 
	 nei = sort (nei)
		
	 find((nei == resulset) == 0)